home *** CD-ROM | disk | FTP | other *** search
/ My Neighborhood / My Neighborhood.iso / mac / MacFiles / ExitAir.Dxr / 00031.ls < prev    next >
Encoding:
Text File  |  1997-11-21  |  844 b   |  31 lines

  1. on mouseDown
  2.   global mySprite
  3.   set the visible of sprite 20 to 0
  4.   set wagonH to 577
  5.   set wagonV to 386
  6.   set mySprite to the clickOn
  7.   set startH to the locH of sprite mySprite
  8.   set startV to the locV of sprite mySprite
  9.   set the castNum of sprite mySprite to the castNum of sprite mySprite + 900
  10.   set snapped to dragItem(wagonH, wagonV, 0, 1)
  11.   if not snapped then
  12.     if sprite mySprite intersects 3 then
  13.       set NewsnapH to 1
  14.     else
  15.       set NewsnapH to 0
  16.     end if
  17.     if NewsnapH = 0 then
  18.       set the locH of sprite mySprite to startH
  19.       set the locV of sprite mySprite to startV
  20.       set the castNum of sprite mySprite to the castNum of sprite mySprite - 900
  21.       updateStage()
  22.     else
  23.       snapTo(mySprite, wagonH, wagonV)
  24.       set snapped to 1
  25.     end if
  26.   end if
  27.   if snapped then
  28.     go("back out")
  29.   end if
  30. end
  31.